﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LiveResults.Model
{
    public class RadioControl
    {
        public string ControlName { get; set; }
        public int ControlCode { get; set; }
        public bool Upload { get; set; }

        public override bool Equals(object obj)
        {
            if (!(obj is RadioControl))
                return false;
            
            RadioControl other = obj as RadioControl;
            if (other.ControlCode != ControlCode || other.ControlName != ControlName)
                return false;

            return true;
        }

        public override int GetHashCode()
        {
            return ControlName.GetHashCode() + ControlCode.GetHashCode();
        }
    }
}
